<?xml version="1.0" encoding="EUC-KR" ?>
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR" />
<title>Log-in</title>
<script type="text/javascript">
function login() {
	$.ajax({
	    type		: "POST",
	    url			: "./authenticate",
	    data		: "login_id="+document.getElementById("login_id").value + "&login_pw="+document.getElementById("login_pw").value,
		dataType	: "text",
		success		: function(resp) {
			if(resp == "true") {
				alert("true");
				$.fancybox.close();
				location.href="./index.jsp";
			}
			else {
				alert("false");
			}
		}
	});
}
</script>
</head>
<body>
<table>
	<tr>
		<td>ID</td>
		<td><input type="text" id="login_id"/></td>
	</tr>
	<tr>
		<td>Password</td>
		<td><input type="password" id="login_pw"/></td>
	</tr>
	<tr>
		<td></td>
		<td align="right"><input type="button" value="Login" onclick="login()"/></td>
	</tr>
</table>
</body>
</html>